{echo:JS::import('dialog?skin=brief');}
{echo:JS::import('dialogtools');}
{echo:JS::import('validator');}
{echo:JS::import('form');}
{echo:JS::import('date');}
<form action="" method="post">
    <div class="tools_bar clearfix">
    <!-- 
        <a class="icon-checkbox-checked icon-checkbox-unchecked" href="javascript:;" onclick="tools_select('id[]',this)" title="全选" data="true"> 全选 </a>
         -->
         <a href="javascript:;" class="icon-loop-2" onclick="tools_reload()"> 刷新</a>
        <a  class="icon-plus" href="{url:/app/category_edit}" title="添加"> 添加</a>
        <!-- <a href="javascript:;" class="icon-loop-2" onclick="tools_reload()"> 刷新</a> -->
    </div>
        <table class="default">
            <tr>
                <!-- <th style="width:30px">选择</th> -->
                <th style="width:70px">操作</th>
                 
                <th style="width:100px">名称</th>
                <th style="width:100px">所属位置</th>
                
                <th style="width:50px">顺序</th>
                
                <th>相关商品</th>
            </tr>
            <!-- status 0为轮播图  1为分类广告 -->
            {query:name=app_ad item=$item where=status eq 1 order=type asc,ad_order desc}
            <tr align="left">
            	
            	<td style="width:70px" class="btn_min">
            	    <div class="operat hidden"><a  class="icon-cog action" href="javascript:;"> 处理</a>
            	        <div class="menu_select">
            	            <ul>
                     
                    <li><a class="icon-pencil" href="{url:/app/category_edit/id/$item[id]}"> 编辑</a></li>
                    
			
                                <li><a class="icon-close" href="javascript:;" onclick="confirm_action('{url:/app/category_del/id/$item[id]}')"> 删除</a></li>
                                
               	            </ul>
               	        </div>
               	   </div>
               	</td>
               	<td>
               		{$item['name']}
               	</td>
            	<td>
            		{if:$item['type']==0}
            			商城首页
            		{elseif:$item['type']==1}
            			购物积分专区
            		{elseif:$item['type']==2}
            			重消积分专区	
            		{/if}
            	</td> 
            	<td>
            		{$item['ad_order']}
            	</td>           	
            	<td>
            		<table>
            		<tr>
            			<div>
            		{set:$arr=explode(',',$item['content']);}
            		{list:items=$arr item=$it}
            			{set:$goods_obj=Common::getGoodsInfo($it)}
            				<td>
            					<img src="{url:@$goods_obj[img]}" width="100px" height="50px;"/><br>
            				{$goods_obj['name']}&nbsp;&nbsp;
            				<a href="{url:/app/category_del_c/id/$item[id]/gid/$goods_obj[id]}" onclick="return confirm('确定要执行此操作吗？');">删除</a>
            				</td>
            			
            		{/list}
            			</div>
            		</tr>
            		</table>
            	</td>
            	
            </tr>
            {/list}
            </table>
    </form>